package com.mengtian_tech.smart_lab.util;

import com.drew.imaging.ImageMetadataReader;  
import com.drew.imaging.ImageProcessingException;  
import com.drew.metadata.Directory;  
import com.drew.metadata.Metadata;  
import com.drew.metadata.Tag;  
  
import javax.imageio.ImageIO;  
import javax.imageio.ImageReader;
import javax.swing.*;  
import java.awt.*;  
import java.awt.image.BufferedImage;  
import java.io.*;  

public class ImageUtilsTest {
	public static void main(String args[]) throws IOException, Exception{
		FileInputStream in = new FileInputStream("e:/test/sign.jpg");
		byte[] data = ImageUtils.transferAlpha(ImageIO.read(new File("e:/test/sign.jpg")), in, 200);
		
		in.close();
		
		FileOutputStream fos = new FileOutputStream("e:/test/sing-2.png");
		fos.write(data);
		fos.close();
		
		
		
	}
}
